package cn.tedu.controller;/**
 * @Author 金帮嘉诚 @Date 2021-07-15 星期四 9:57
 */
/*本类用于测试*/

import cn.tedu.pojo.Student;
import cn.tedu.utils.jdbc.JdbcUtils;
import cn.tedu.utils.jdbc.StuTb;
import com.mysql.cj.exceptions.CJConnectionFeatureNotAvailableException;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.*;
import java.util.List;

/**
 * 知识点
 */
@RestController
@RequestMapping("/stu/")
public class StuController {
    @CrossOrigin
    @RequestMapping("insert")
    public String insert(Student student) {
        return StuTb.insert(student);
    }
    @CrossOrigin
    @RequestMapping("delete")
    public String delete(Student student){
//        System.out.println(student);
        return StuTb.delete(student);
    }
    @CrossOrigin
    @RequestMapping("select")
    public List<Student> select(Student student){
        return StuTb.select(student);
    }

}
